home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / processes / wait < prev   
Encoding:
Text File  |  1993-10-26  |  2.1 KB  |  38 lines  |  [TEXT/$Tcl]

  1.  
  2.  
  3.           wait ?-nohang? ?-untraced? ?-pgroup? ?pid?
  4.                Waits for a process created with the execl  command  to
  5.                terminate, either due to an untrapped signal or call to
  6.                exit system call.  If the process id pid is  specified,
  7.                they  wait on that process, otherwise wait on any child
  8.                process to terminate.
  9.  
  10.                If -nohang is specified, then don't block waiting on  a
  11.                process  to  terminate.   If  no process is immediately
  12.                available, return  an  empty  list.   If  -untraced  is
  13.                specified  then  the status of child processes that are
  14.                stopped, and whose status has  not  yet  been  reported
  15.                since  they  stopped, are also returned.  If -pgroup is
  16.                specfied and pid is not specified,  then  wait  on  any
  17.                child  process  whose process groupd ID is they same as
  18.                the calling process. If pid is specified with  -pgroup,
  19.                then  it  is take as a process group ID, waiting on any
  20.                process in that process group to terminate.
  21.  
  22.                Wait returns a  list  containing  three  elements:  The
  23.                first  element  is  the  process id of the process that
  24.                terminated.  If the process exited normally, the second
  25.                element  is  `EXIT', and the third contains the numeric
  26.                exit code.  If the process terminated due to a  signal,
  27.                the second element is `SIG', and the third contains the
  28.                signal name.  If the process is currently  stopped  (on
  29.                systems  that  support  SIGSTP),  the second element is
  30.                `STOP', followed by the signal name.
  31.  
  32.                Note that it is possible to wait on processes  to  ter-
  33.                minate that were create in the background with the exec
  34.                command.  However, if any other exec  command  is  exe-
  35.                cuted  after  the  process terminates, then the process
  36.                status will be reaped by the exec command and will  not
  37.                be available to the wait command.
  38.